package day10.Exer;


public class Sonar implements Scan {
    public void scan(Fish a){
        a.swim();
        System.out.println("声呐发现了鱼");
    }

    @Override
    public void scan(Submaine a) {
        a.swim();
        System.out.println("声呐发现了潜艇");
    }
}
